package com.skynet.backend.auth.sys.dao;

import com.skynet.backend.auth.sys.entity.SysMenuEntity;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper()
public interface SysMenuDao extends BaseDao<SysMenuEntity> {

    /**
     * 根据父菜单，查询子菜单
     * @param parentId 父菜单ID
     * @return
     */
    List<SysMenuEntity> queryMenuListByParentId(Long parentId);


    /**
     * 查询用户的菜单列表
     * @param userId 用户ID
     * @return
     */
    List<SysMenuEntity> queryMenuListByUserId(Long userId);

    /**
     * 查询用户的菜单ID
     * @param userId 用户ID
     * @return
     */
    List<Long> queryMenuIdByUserId(Long userId);

}
